<template>
    <h4 class="text-center">用户管理</h4>
    <table border style="width:100%;">
        <thead>
            <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>等级</th>
            <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr v-for="(item) in userlist" :key="item.id">
                <td>{{item.id}}</td>
                <td>{{item.name}}</td>
                <td>{{item.level}}</td>
                <td>
                    <router-link :to="'/home/users/'+item.id">详情</router-link>
                </td>
            </tr>
        </tbody>
    </table>
</template>

<script setup>
import { ref } from 'vue'
const userlist = ref([
    {id:1,name:'张三',level:'一级用户'},
    {id:2,name:'李四',level:'二级用户'},
    {id:3,name:'王五',level:'三级用户'},
    {id:4,name:'萨六',level:'四级用户'},
])
</script>